package com.akuhome.resource.enums;

import com.akuhome.resource.enums.mapper.CodeBasedEnum;
import com.akuhome.resource.util.CodeEnumUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum NeedStatus implements CodeBasedEnum {
    IN_APPROVAL(0),WAIT_MODIFY(1),COMPLETE(2);

    private final Integer value;
    NeedStatus(Integer v){
        this.value = v;
    }
    @JsonValue
    public Integer getValue() {
        return value;
    }

    @JsonCreator
    public static NeedStatus valueOf(Integer value){
        return CodeEnumUtil.codeOf(NeedStatus.class,value);
    }

    @Override
    public Integer getCode() {
        return getValue();
    }
}
